

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <base target="_self" />
    <title id="paipaicms">代金券  </title>
</head>
<body id="PaiPai">
    <#include "top.html">
    <script type="text/javascript" language="javascript">

//拍卖设置
window.inibidjs='';
window.isfoucs=1;
$(document).ready(function(){
	$("#logo").pngFix();
});

//晒图..
function PicManage(id)
{
	SetActive(id);
	AjaxSubmit(null,"../UpPic/UserOrderPic.aspx@PhotoType=4&PhotoUserType=1",{"InfoId":id}
	,function(msg){
	AddDialogbox("Ajax_User_UpPic","",60001,582,"Ajax_User_UpPic_screenMask",10000,true,msg);
	},null);	
}

    </script>
    <div class="n_body">
        <div class="main">
            <div class="mainArea clearfix">
                <!--左边-->
                <#include "userleft.html">
                <!--右边-->
                <div class="mainshop">
                    <div style="width: 783px; height: 39px; background-image: url(${base}/res/front/images/ucenter/r_top.jpg)">
                        <div class="shopup">
                            未使用的代金券
                        </div>
                    </div>
                    <div  style="position: relative; width: 783px; padding-bottom: 50px;
                        min-height: 412px; height: auto !important; height: 761px; background-image: url(${base}/res/front/images/ucenter/r_middle.jpg);">
                        <script type="text/javascript">
                        function getOs()//判断浏览器      
                        {      
                           var OsObject = "";      
                           if(navigator.userAgent.indexOf("MSIE")>0) {      
                                return "MSIE";       //IE浏览器   
                           }   
                           if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){      
                                return "Firefox";     //Firefox浏览器   
                           }   
                           if(isSafari=navigator.userAgent.indexOf("Safari")>0) {      
                                return "Safari";      //Safan浏览器   
                           }   
                           if(isCamino=navigator.userAgent.indexOf("Camino")>0){      
                                return "Camino";   //Camino浏览器   
                           }   
                           if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){      
                                return "Gecko";    //Gecko浏览器   
                           }      
                        } 
         
                        var XMLHttpRequestObject=false;
                        function ChangeTicketState(num)
                        {
                            var btype=getOs(); 
                            if(btype!="Firefox")
                            {   
                                XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");   
                            }
                            else
                            {   
                                XMLHttpRequestObject =new XMLHttpRequest();   
                            }  
                            if(XMLHttpRequestObject)
                            {
                                 var dom;
                                 XMLHttpRequestObject.open("POST","../AliPayUtf8/TicketBind.aspx@num=" + num,true);
                                 XMLHttpRequestObject.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
                                 XMLHttpRequestObject.onreadystatechange= (btype!="Firefox")?callback_ticket:callback_ticket();
                                 XMLHttpRequestObject.send(null);
                                 XMLHttpRequestObject.onreadystatechange= (btype!="Firefox")?callback_ticket:callback_ticket();
                            }      
                        }
                        function callback_ticket()
                        {
                            if(XMLHttpRequestObject.readyState==4 && XMLHttpRequestObject.status==200)
                            {
                                var des = XMLHttpRequestObject.responseText;
                            
                                switch(des)
                                {
                                    case "1":alert("无此代金券，请确认券号是否正确！");break;
                                    case "2":alert("您的代金券已被绑定过！");break;
                                    case "3":alert("您的代金券绑定成功！");window.location.href="ticket.aspx";break;                                    
                                }
                                
                            }
                        }
                        function checkcard()
                        {
                            var num = document.getElementById("txtcard").value;
                            if(num == "")
                            {
                                alert("请先填入代金券编号。");
                            }
                            else
                            {
                                ChangeTicketState(num)
                            }
                        }
                        </script>
                        <div style="width:600px; height:50px;margin-left:20px; margin-top:20px;font-family:微软雅黑; margin-bottom:20px; ">
                        <span style="font-size:15px; color:#F26521; font-weight:bold;">查询、绑定代金券</span>
                        <hr />
                        请输入券号：<input id="txtcard" type="text" style="width: 299px" /><input id="btnbind" type="button" value="绑定" onclick="checkcard();" />
                        <hr />
                        </div>
                        <div class="now">
                            <div class="word">
                                <a href="ticket.aspx@type=0" class="black">未使用</a> | <a href="ticket.aspx@type=1" class="black">已使用</a>
                                | <a href="ticket.aspx@type=2" class="black">已过期</a></div>
                            <a name="order"></a>
                            <div class="table">                             
                                <div class="bian" style="border-top:1px solid #e4e3e3;">
                                    <div class="nullmessage">暂无未使用的代金券</div>
                                    <table width="100%">
                                    </table>
                                    <!-- .pages -->
                                    <div class='page'>
                                        <span class='disabled'>首页</span><span class='disabled'>上一页</span> <span class='selected' title='当前页'>1</span> <span class='disabled'>下一页</span><span class='disabled'>末页</span>
                                    </div>
                                    <!-- .pages end -->
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="height: 9px; width: 783px; overflow: hidden; background-image: url(${base}/res/front/images/ucenter/r_bottom.jpg);">
                    </div>
                </div>
            </div>
        </div>
    </div>
        <script type="text/javascript">
            $(".maintalk2").find(".shopping").find("a").each(function (i, o) {
                var _a = o.href.toLowerCase();
                var _b = location.href.toLowerCase();
                if (_a == _b) o.style.fontWeight = "bold";
            });
        </script>

        <!-- #footer -->
        <#include "foot.html">
        <!-- #footer end -->
</body>
</html>
